package cn.liulingfengyu.behavioralpatterns.visitorpattern;

/**
 * 具体访问者
 */
public class ConcreteVisitor implements Visitor {
    @Override
    public void visitElementA(ElementA element) {
        System.out.println("ConcreteVisitor 访问 ElementA");
        element.operationA();
    }

    @Override
    public void visitElementB(ElementB element) {
        System.out.println("ConcreteVisitor 访问 ElementB");
        element.operationB();
    }
}